﻿namespace XiaoSe.IO
{
    /// <summary>
    /// IO帮助类
    /// </summary>
    public class IoHelper
    {
        /// <summary>
        /// 去掉文件夹(文件)名字中的非法字符
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string RemoveIllegalCharOnFileName(string value)
        {
            value = value.Replace("\\", "");
            value = value.Replace("/", "");
            value = value.Replace(":", "");
            value = value.Replace("?", "");
            value = value.Replace("\"", "");
            value = value.Replace("<", "");
            value = value.Replace(">", "");
            value = value.Replace("|", "");
            value = value.Replace("*", "");
            return value;
        }
    }
}
